﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WowVoiceBox
{
    /// <summary>
    /// Interaction logic for InputPrompt.xaml
    /// </summary>
    public partial class InputPrompt : Window
    {
        private String _Value;
        public String Value
        {
            get { return _Value; }
        }

        private MessageBoxResult _Result;
        public MessageBoxResult Result
        {
            get { return _Result; }
        }

        public InputPrompt(String title, String prompt)
        {
            InitializeComponent();
            this.Title = title;
            lblPrompt.Content = prompt;
        }

        private void btnOK_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _Value = tbInput.Text;
            _Result = MessageBoxResult.OK;
            this.Close();
        }

        private void btnCancel_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _Result = MessageBoxResult.Cancel;
            _Value = null;
            this.Close();
        }
    }
}
